home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
programr
/
dpmigcc5.zip
/
RSX
/
DOC
/
KRNLDEB.TXT
< prev
next >
Wrap
Text File
|
1994-12-12
|
2KB
|
60 lines
Debugging RSX (32bit):
----------------------
1) Build debugging version of rsx:
(you should use ndmake, dmake)
run makefile in \rsx\source\fpu-emu
run makefile in \rsx\source
2) edit the path for the GDB in \rsx\source\rsxdeb.bat
3) Execute batch-file rsxdeb.bat
to call: rsxdeb.bat myprog.exe
myprog.exe is your test program
(rsx32 need work / GDB can't debug itself in kernel)
Sample Session:
---------------
c:\rsx\source> rsxdeb sample/exec.emx // your command
RSX32 [beta rev4] dpmi 0.9/1.0 extender (c) Rainer Schnitker '93 '94
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.11 (emx), Copyright 1993 Free Software Foundation, Inc...
"c:/rsx/source/sample/exec.emx" is not a core dump: File format not recognized
// ignore this
(gdb) tb sys_write // temp breakpoint
Breakpoint 1 at 0x1ccc3: file fs.c, line 165.
(gdb) r // run !! (neccesary)
Starting program: c:/rsx/source/rsx32.emx
KERNEL DEBUG MODE with second prg sample/exec.emx // correct message
sys_write (fd=1, buf=53183, bytes=7) at fs.c:165
165 if (fd >= N_FILES)
(gdb) n // next
167 if (!(file = npz->filp[fd]))
.
.
.
.
(gdb) q // quit
Hints:
------
The "Kernel Debug Mode" allowes to debug all function following
the entry function int21() in sysemx.c.
These are sysemx.c, cdosx32.c, process.c, termio.c, ...
Global variables can be changed from GDB syscalls.
GDB uses also the IO transfer buffer (could changed).
You can't debug rsx.c. This file will never executed again.
Don't debug exception handlers or kernel debug functions!